import java.io.*;
import java.util.*;

public class Practice3_2{
        public static void main (String args[]){
 
     		Undergraduate su=new Undergraduate("B2016001","Tom","1998-10-5","Jerry");
    		Graduate sg = new Graduate("Y2014008","Marry","1996-6-8","Prof. Gray");
    		System.out.println("Undergraduate student:");
    		su.getInfo();
    		System.out.println();
    		System.out.println("Graduate student:");
    		sg.getInfo();
     
    	}
     
    }
     
     
       
    class Student {
    	String id;
    	String name;
    	String birth;  
    
    	
    	public Student(String id, String name, String birth) {
    
    		this.id = id;
    		this.name = name;
    		this.birth = birth;
    		
    	}
    	
    	public void getInfo(){
    		System.out.println("id="+id);
    		System.out.println("name="+name);
    		System.out.println("birthday="+birth);
    	}   
    }
     
     
     
     
    class Undergraduate extends Student{
    	
    	String counselor;
    	
    	public Undergraduate(String id, String name, String birth, String counselor){
    		super(id, name, birth);
    		this.counselor=counselor;
    	}
    	
    	public void getInfo(){
    		super.getInfo();
     		System.out.println("counselor ="+counselor);
    	}
  }

    	
     class Graduate extends Student{
     	String supervisor;
    	
    	public Graduate(String id, String name, String birth, String supervisor) {
    		super(id, name, birth);
    		this.supervisor = supervisor;
    	}
    	public void getInfo(){
    		super.getInfo();
    		System.out.println("supervisor = "+ supervisor);
    	}  	
     
    }
	    	

